﻿using System;
using System.Collections.Generic;
using System.Text;

namespace Meqs.Entity
{
    /// <summary>
    /// 全局课程设置
    /// </summary>
    [Serializable]
    public class GlobalCauseInfo
    {
        public GlobalCauseInfo()
        {
        }

        public GlobalCauseInfo(int rID, int causeNo, string causeName,int isEffect)
        {
            _rID = rID;
            _causeNo = causeNo;
            _causeName = causeName;
            _isEffect = isEffect;
        }

        private int _rID;
        private int _causeNo;
        private string _causeName;
        private int _isEffect;

        public int RID
        {
            get { return _rID; }
            set { _rID = value; }
        }

        public int CauseNo
        {
            get { return _causeNo; }
            set { _causeNo = value; }
        }

        public string CauseName
        {
            get { return _causeName; }
            set { _causeName = value; }
        }

        public int IsEffect
        {
            get { return _isEffect; }
            set { _isEffect = value; }
        }

        public bool Equals(GlobalCauseInfo other)
        {
            if (ReferenceEquals(null, other)) return false;
            if (ReferenceEquals(this, other)) return true;
            return other._rID == _rID;
        }

        public override bool Equals(object obj)
        {
            if (ReferenceEquals(null, obj)) return false;
            if (ReferenceEquals(this, obj)) return true;
            if (obj.GetType() != typeof(GlobalCauseInfo)) return false;
            return Equals((GlobalCauseInfo)obj);
        }

        public override int GetHashCode()
        {
            return _rID;
        }
    }
}
